//
//  goodsModel.m
//  goods
//
//  Created by student on 16/3/7.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "goodsModel.h"

@implementation goodsModel
- (instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}
+ (instancetype)GoodsWithDict:(NSDictionary *)dict
{
    return [[self alloc]initWithDict:dict];
}
+ (NSArray *)arr
{
    NSString *path = [[NSBundle mainBundle]pathForResource:@"goods" ofType:@"plist"];
    NSArray *arr = [NSArray arrayWithContentsOfFile:path];
    NSMutableArray *arr1 = [NSMutableArray array];
    for (NSDictionary *dict in arr) {
        goodsModel *gm = [goodsModel GoodsWithDict:dict];
        [arr1 addObject:gm];
    }
    return arr1;
}
@end
